package com.zhiyi.coco.controller;

import com.zhiyi.coco.entity.Job;
import com.zhiyi.coco.service.JobService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.log4j.Log4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import java.util.List;
@Api(value = "JobController", description = "职位表")
@Controller
@RequestMapping("/job")
@Log4j
public class JobController {
    @Autowired
    private JobService service;

    @ApiOperation("查询表中所有职位列")
    @ResponseBody
    @RequestMapping("/getAllJob")
    public List<Job> getAllJob(){
        List<Job> job=service.getAllJob();
        log.info(job);
        return job;
    }
}
